package cn.cocho.android.mc.async;

import java.util.concurrent.ThreadFactory;

import cn.cocho.android.mc.log.RunTimeExceptionHandler;
import cn.cocho.android.mc.util.CommonContexts;

/**
 * 异步线程工厂，用于记录异步任务运行时的日志
 * 
 * @author HAIKANG SONG
 * @time 2013-4-23下午4:13:36
 */
@Deprecated
class AsyncThreadFactory implements ThreadFactory{

	@Override
	public Thread newThread(Runnable r) {
		Thread thread = new Thread(r);
		RunTimeExceptionHandler exceptionhandler = new RunTimeExceptionHandler();
		thread.setUncaughtExceptionHandler(exceptionhandler);
		thread.setName(CommonContexts.companyName);//线程名称
		return thread;
	}

}
